import request from '@/utils/request'

// 查询运单追踪列表
export function listTrack(shipmentId) {
  return request({
    url: '/shipment/track/trackList/' + shipmentId,
    method: 'get'
  })
}

// 查询运单追踪详细
export function getTrack(id) {
  return request({
    url: '/shipment/track/' + id,
    method: 'get'
  })
}

// 新增运单追踪
export function addTrack(data) {
  return request({
    url: '/shipment/track',
    method: 'post',
    data: data
  })
}

// 修改运单追踪
export function updateTrack(data) {
  return request({
    url: '/shipment/track',
    method: 'put',
    data: data
  })
}

// 删除运单追踪
export function delTrack(id) {
  return request({
    url: '/shipment/track/' + id,
    method: 'delete'
  })
}

// 追踪
export function trackForString(id) {
  return request({
    url: '/shipment/track/trackForString/' + id,
    method: 'get',
  })
}
